<div style="display: flex;justify-content: center;">
    <nav aria-label="...">
        <ul class="pagination">
          <li class="page-item ">
            <a class="page-link" href="?{{params}}page=1">首页</a>
          </li>
          <li class="page-item">
            {% if queryset.has_previous %}
            <a class="page-link" href="?{{params}}page={{ queryset.previous_page_number }}">&laquo; 前一页</a>
            {% endif %}
          </li>
          {% for i in page_range%}
                {% if cur_num == i%}
                <li class="page-item active" aria-current="page">
                    <a class="page-link" href="?{{params}}page={{ i }}">{{i}}</a>
                </li>
                {% else %}
                <li class="page-item">
                    <a class="page-link" href="?{{params}}page={{ i }}">{{i}}</a>
                </li>
                {% endif %}
            {% endfor %}
          <li class="page-item">
            {% if queryset.has_next %}
            <a class="page-link" href="?{{params}}page={{ queryset.next_page_number }}">下一页&raquo;</a>
            {% endif %}
          </li>
          <li class="page-item">
            <a href="?{{params}}page={{ queryset.paginator.num_pages }}">尾页 </a>
          </li>
          <li class="page-item">
            <span class="current">
                第{{ queryset.number }}页/共{{ queryset.paginator.num_pages }}页
            </span>
          </li>
        </ul>
      </nav>
</div>